export default async function({ app, route, redirect }) {
    const param = { 'path': route.path ,"suid":sessionStorage.getItem("suid")}
    const { status } = await app.store.dispatch('check_auth', param)
    if (status === 'skip') return redirect('/no-auth')
    if (status === 'failed') return redirect('/login')
    await app.store.dispatch('update_token')
}